home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 20
/
CU Amiga Magazine's Super CD-ROM 20 (1998)(EMAP Images)(GB)[!][issue 1998-03].iso
/
CDsupport
/
VirusZ
/
ARexx
/
CheckFile.vzrx
< prev
Wrap
Text File
|
1997-12-15
|
1KB
|
53 lines
/*
$VER: CheckFile.vzrx 1.01 (30.9.95)
© 1995 by Georg Hörmann
Template: CheckFile.vzrx FILE/A,QUIT/S
FILE: Must be a valid filename (with path).
QUIT: If VirusZ has been started from the script, you can
quit after checking by specifying this option.
If VirusZ is not running, it will be started from the
script (and quitted afterwards if requested).
*/
Prog_VirusZ = "dh0:VZ" /* You may change this */
options results
options failat 99
UseQuitFlag = "no"
parse upper arg FileToCheck QuitFlag
if FileToCheck = "" then do
say "No file specified."
exit
end
if ~show(ports,VIRUSZ_II.REXX) then do
say "Starting VirusZ..."
address command Prog_VirusZ
UseQuitFlag = "yes"
StartTime = time(seconds)
do while ~show(ports,VIRUSZ_II.REXX)
if time(seconds) - StartTime > 20 then do
say "Error loading VirusZ!"
exit
end
end
end
address VIRUSZ_II.REXX CHECKFILE FileToCheck DECREXEC DECRDATA
if rc=0 then say "File is clean."
if rc=5 then say "File contains virus!"
if rc=10 then say "Error checking file!"
if UseQuitFlag = "yes" then do
if QuitFlag = "QUIT" then do
say "Quitting VirusZ..."
address VIRUSZ_II.REXX QUIT
end
end